package com.eco
{
	import com.eco.*;
	import com.framework.*;
	
	import flash.display.MovieClip;
	import flash.events.*;
	import flash.utils.*;
	
	//鱼钩敌人
	public class EnemyHook extends Enemy
	{
		public function EnemyHook()
		{
			super( 100, 10, Enemy.ENEMY_HOOK);
			
			iFreezedFrames = 32;
			iAttackPower = 2;
			iAttackPossibility = 200;
			iSkillLastingTime = 150;
		}
		
		override public function Update():void
		{
			super.Update();
		}
		
		override protected function Attack():void
		{
			super.Attack();
		}
		
		override protected function StartSkill():void
		{
			this.iMass *= 2;
			this.scaleX = 1.5;
			this.scaleY = 1.5;
		}
		
		override protected function EndSkill():void
		{
			this.iMass /= 2;
			this.scaleX = 1;
			this.scaleY = 1;
		}
		
		override protected function BeatFighter():void
		{
			//super.BeatFighter();
		}
		
		override protected function BeBeaten():void
		{
			super.BeBeaten();
			
			//鱼钩敌人被卫士撞飞时，有一定几率获得质量倍增效果，在一定时间内变得十分厚重，难以撼动
			if( Math.random()<= iAttackPossibility/1000 )
			{
				this.SetState( Enemy.STATE_SKILL );
			}
		}
	}
}